Add a compact text style selector to Content - #2601
Conversation
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Builder reviewed your changes and has a few items to flag 🟡
Review Details
Incremental Code Review Summary
The latest commit addresses the previous H5/H6 compatibility issue: the selector now detects all supported heading levels, shows H5/H6 in the trigger, converts them to Text, and intentionally keeps only Text/H1–H4 in the menu. The focused tests were expanded to cover H5/H6 conversion and a live paragraph-to-H5 transition. The change remains low risk overall because it is confined to Content editor UI, tests, changelog metadata, and visual evidence.
Key Findings
Medium: Escape dismissal suppresses Popover close autofocus unconditionally. When the focused menu closes via Escape, focus is not restored to the trigger or editor, so the bubble can disappear and the user must click back into the document before continuing.
Medium: A mixed selection spanning a paragraph and heading is classified as paragraph by editor.isActive, so selecting Text takes the no-op path and leaves any selected heading blocks unchanged. Text should apply paragraph conversion unconditionally to the selected blocks.
The H5/H6 repair itself is sound, and the pointer/keyboard selection logic and accessibility roles remain consistent with the intended design. Browser verification was attempted against the healthy dev server, but all executor retries lacked browser interaction tools.
🧪 Browser testing: Skipped — browser executor tooling was unavailable after retries; all planned cases were reported as unable to verify.

Problem
The Content selection toolbar exposed four permanent H1-H4 buttons but no way to return selected text to regular body text. The four controls also consumed a disproportionate amount of the compact toolbar.
Approach
Matched visual evidence
Before
Route:
http://127.0.0.1:3317/page/j4a5KAEDBHXYViewport:
1496 x 846, desktop ChromeFixture: disposable local account
toolbar-demo@example.com; pageToolbar comparison; paragraphSelect this sentence to compare the formatting toolbar.State: Personal expanded, agent panel closed, full paragraph selected, formatting bubble open, no submenu.
After
Route:
http://127.0.0.1:3317/page/vDisteHisXMqViewport:
1496 x 846, desktop ChromeFixture: same account, page title, paragraph, sidebar state, and agent-panel state. The route differs because the isolated worktree uses its own disposable local fixture database.
State: full paragraph selected, formatting bubble open, Text selector expanded, Text checked, H1-H4 visible.
The matched captures and their reproduction notes are retained in
templates/content/docs/solutions/evidence/content-text-selector/.Verification
pnpm --filter content exec vitest --run app/components/editor/BubbleToolbar.test.tsx— 8 tests passed, including existing H5/H6 identification and conversion plus a live paragraph-to-H5 transitionpnpm --filter content typecheck— passedpnpm --filter content build— passed; existing non-blocking doctor findings remainpnpm guards— all checks passedSafety and review focus
Visual-review handoff
Steve's current guidance is to share screenshots of prominent UX changes asynchronously in
#dev-agent-native; it explicitly does not need to block shipping. Guidance thread: https://builder-internal.slack.com/archives/C0AKU9QD539/p1784744132830489?thread_ts=1784744132.830489&cid=C0AKU9QD539Original selector/highlight feedback: https://builder-internal.slack.com/archives/C0ATH3CCZT4/p1785450194911999
This PR prepares the evidence for that later review. It does not claim Slack visual approval, and it does not include the separate Notion-style highlight-color work or the later H5/H6-disable idea.